<?php
namespace app\api\model;
use think\Model;

class Receipt extends Model{
    protected $type = [
        'type'            =>'integer',
        'id'            =>'integer',
        'is_review'    =>  'integer',
        'income_id'    =>  'integer',
        'subject_id'    =>  'integer',
        'money' => 'float'       
    ];
   

    public function incomes(){
        return $this->hasOne('TeamIncome','id','income_id')->with('team');
    } 
    
    public function singles(){
        return $this->hasOne('Single','id','income_id');
    } 
    
    
}